/* 
 * 应用表单校验相关配置
 * 依赖：graceChecker.js 进行校验
 * 
 * 使用：引入该js到页面，let res = graceChecker.check({phoneNo:"",code:""},formRule.loginRule)
 */

export default {
	
	// 验证手机号
	mobileRule: [{
		name: "telnumber",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "手机号不能为空"
	}, {
		name: "telnumber",
		checkType: "phoneno",
		checkRule: "",
		errorMsg: "手机号格式不正确"
	}],
	// 发送验证码验证手机号
	sendCodeRule: [{
		name: "telnumber",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "手机号不能为空"
	}, {
		name: "scode",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "验证码不能为空"
	}, {
		name: "telnumber",
		checkType: "phoneno",
		checkRule: "",
		errorMsg: "手机号格式不正确"
	}],
	
	// 商家联盟
	shopAlliance: [{
		name: "buyerName",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "姓名不能为空"
	},{
		name: "buyerPhone",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "手机号不能为空"
	}, {
		name: "buyerPhone",
		checkType: "phoneno",
		checkRule: "",
		errorMsg: "手机号格式不正确"
	}, {
		name: "shopName",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "店铺名字不能为空"
	}, {
		name: "buyerAddress",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "店铺地址不能为空"
	}],
	
	// 提交地址
	address: [{
		name: "postalName",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "收货人姓名不能为空"
	}, {
		name: "phone",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "收货人手机号码不能为空"
	}, {
		name: "phone",
		checkType: "phoneno",
		checkRule: "",
		errorMsg: "手机号格式不正确"
	}, {
		name: "areaName",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "请选择所在地区"
	}, {
		name: "address",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "请填写您收货的详细地址"
	}],
	
	// 发布闲本
	issuerIdle: [{
		name: "productIcon",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "请上传剧本封面"
	}, {
		name: "scenName",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "剧本名称不能为空"
	}, {
		name: "scenNum",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "剧本人数不能为空"
	}, {
		name: "scriptPublisher",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "发行商不能为空"
	}, {
		name: "productDescription",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "剧本描述不能为空"
	}, {
		name: "areaName",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "请选择所在地区"
	}, {
		name: "sellerAddress",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "详细地址不能为空"
	}, {
		name: "productDiscountPrice",
		checkType: "price",
		checkRule: "",
		errorMsg: "价格格式不正确"
	}, {
		name: "productPrice",
		checkType: "price",
		checkRule: "",
		errorMsg: "入手价格格式不正确"
	}, {
		name: "productCommquality",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "剧本成色不能为空"
	}],
	
	
	// 快递
	courier: [{
		name: "couriercompany",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "快递公司名称不能为空"
	}, {
		name: "courierNumber",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "快递单号不能为空"
	}],
	
	// 支付宝绑定
	changealipay:[{
		name: "alipayaname",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "姓名不能为空"
	}, {
		name: "alipayaname",
		checkType: "reg",
		checkRule: "^([\\u4e00-\\u9fa5]{1,20}|[a-zA-Z\\.\\s]{1,20})$",
		errorMsg: "请输入合法姓名"
	}, {
		name: "alipayaccount",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "支付宝账号不能为空"
	}],
	// 更改账户申请
	changebank:[{
		name: "cardholder",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "姓名不能为空"
	}, {
		name: "cardholder",
		checkType: "reg",
		checkRule: "^([\\u4e00-\\u9fa5]{1,20}|[a-zA-Z\\.\\s]{1,20})$",
		errorMsg: "请输入合法姓名"
	}, {
		name: "bankcardnum",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "卡号不能为空"
	},
	{
		name: "bankcardnum",
		checkType: "card",
		checkRule: "",
		errorMsg: "请输入正确的银行卡号码"
	},
	{
		name: "bankcardname",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "开户行名称不能为空"
	}, {
		name: "idenfrontphoto",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "请上传身份证正面"
	}, {
		name: "idenbackphoto",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "请上传身份证反面"
	}, {
		name: "bkcdfrontphoto",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "请上传银行卡正面"
	},{
		name: "bkcdbackphoto",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "请上传银行卡反面"
	}],
	
	
	
	// 个人信息修改
	shopname: [{
		name: "shopname",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "店铺名称不能为空"
	}],
	shoptelnum:[{
		name: "shoptelnum",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "手机号不能为空"
	}, {
		name: "shoptelnum",
		checkType: "telephone",
		checkRule: "",
		errorMsg: "手机号格式不正确"
	}],
	legalperson:[{
		name: "legalperson",
		checkType: "reg",
		checkRule: "^([\\u4e00-\\u9fa5]{1,20}|[a-zA-Z\\.\\s]{1,20})$",
		errorMsg: "请输入负责人姓名"
	}],
	
	/**
	 * 房间管理
	 */
	roommanage:[{
		name: "roomname",
		checkType: "notnull",
		checkRule: "",
		errorMsg: "房间名称不能为空"
	},{
		name: "maxnum",
		checkType: "string",
		checkRule: "1,3",
		errorMsg: "请选择容纳人数"
	}],
	
}
